package cn.zf;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Px1 {
    public static <e> void main(String[] args) {
        //统计当前Java文件源码有多少行代码
       //ctrl+shift+c复制当前路径 D:\JavaStudy\String1\src\cn\zf\Px1.java
    String src="D:\\JavaStudy\\String1\\src\\cn\\zf\\String2.java";
        try(var fis=new BufferedReader(new FileReader(src))){
            System.out.println(fis.lines().count());
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
